package factory;

import objects.ImageObject;

public class ImageObjectFactory {
	
	public static ImageObject createImageObject(int type){
		ImageObject img =new ImageObject();
		switch (type){
		case Constants.OBJECT_REFERENCE_BOMBERMAN:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_BOMBERMAN]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_BOMBERMAN_COLLISION]);
		break;
		case Constants.OBJECT_REFERENCE_STRAWBERRY:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_STRAWBERRY]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_STRAWBERRY_COLLISION]);
			
		break;
		case Constants.OBJECT_REFERENCE_SUGAR:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_SUGAR]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_SUGAR_COLLISION]);
			
		break;
		case Constants.OBJECT_REFERENCE_CASTLE_RED:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_CASTLE_RED]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_CASTLE_RED]);
			
			break;
		case Constants.OBJECT_REFERENCE_CASTLE_BLUE:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_CASTLE_BLUE]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_CASTLE_BLUE]);
			break;
		case Constants.OBJECT_REFERENCE_MONEY:
			
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_MONEY]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_MONEY]);
			break;
		case Constants.OBJECT_REFERENCE_FUNGI:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_FUNGI]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_FUNGI]);
			break;
		case Constants.OBJECT_REFERENCE_BAD_HOUSE:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_BAD_HOUSE]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_BAD_HOUSE_COLLISION]);
			break;
		case Constants.OBJECT_REFERENCE_HOUSE:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_HOUSE]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_HOUSE_COLLISION]);
			break;
		case Constants.OBJECT_REFERENCE_PERSON:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_PERSON]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_PERSON]);
			break;
		case Constants.OBJECT_REFERENCE_CONSTRUIR:
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_CONSTRUIR]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_CONSTRUIR]);
			break;
		default:
			System.out.println("no encuentro la imagen en image objectFACTORUobject");
			img.setImageToShow(ImagesSingleton.images[Constants.OBJECT_REFERENCE_STRAWBERRY]);
			img.setCollisionShape(ImagesSingleton.images[Constants.OBJECT_REFERENCE_STRAWBERRY_COLLISION]);
		break;
		
		}
		
		return img;
	}
	

}
